package com.mhxy.entity;

import com.mhxy.constant.PicConstants;
import lombok.Data;

import java.io.File;
import java.util.List;

@Data
public class GameLoginInfo {

    private String infoName;

    private String picPath;

    private String loginAccount;

    private String loginServer;

    private List<String> loginUsers;

    public String getLoginAccountPic() {
        return PicConstants.ACCOUNT_PIC_PATH + picPath + File.separator + loginAccount;
    }

    public String getLoginServerPic() {
        return PicConstants.ACCOUNT_PIC_PATH + picPath + File.separator + loginServer;
    }

    public String getLoginUserPic(String point) {
        for (String loginUser : loginUsers) {
            if (loginUser.contains(point)) {
                return PicConstants.ACCOUNT_PIC_PATH + File.separator + picPath + File.separator + loginUser;
            }
        }
        return null;
    }
}
